#ifndef DEADLINETASK_H_
#define DEADLINETASK_H_

#include "FloatingTask.h"

// @author A0096955J

/* Class Name: DeadlineTask
 *
 * This class models a deadline task in Taskline. It is a subclass of the super class
 * FloatingTask and inherits all properities from its super class. The unique attributes
 * of DeadlineTask will be that it contains a due time and date.
 * 
 * Sample usage: 
 * DeadlineTask task,time_t currentTime;
 * task.setTimeAndDate(time(currentTime));
 * cout << task2.getTime();
 * cout << task2.getDate();
 * cout << task1.taskinfomation() << endl;
 *
 */
class DeadlineTask: public FloatingTask{
public:
	// constructors/destructors
	DeadlineTask									(void);
	DeadlineTask									(FloatingTask*);
	DeadlineTask									(string, // title
													 string, // description
													 string, // location
													 string, // person/people
													 int,    // priority 
													 int,    // finished status
													 int,    // index
													 time_t);// date and time
	~DeadlineTask									(void);

	// get attributes methods
	string getTime									(); // returns HHMM format
	string getDate									(); // returns DD/MM/YYYY format
	string getFullDateInfo							(); // returns day, DD month YYYY
	time_t getTimeAndDate							(); // returns time_t format
	struct tm getTimeAndDateTmFormat				(); // returns 

	// clone method
	virtual DeadlineTask* clone						() const;

	// set attributes methods
	void setTimeAndDate								(time_t);
	void setTimeAndDate								(struct tm);

	// infomation of deadline task in string format
	string taskInfomation							();
	string basicTaskInfomation						();
private:
	// due time and date in time_t and struct tm format
	time_t timeAndDateTime_t;
	struct tm timeAndDateTmFormat;
};

#endif
